package com.ly.heart.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ly.common.utils.DateUtils;
import com.ly.heart.mapper.OrderPaymentExecutionMapper;
import com.ly.heart.service.IOrderPaymentExecutionService;
import org.springframework.stereotype.Service;
import com.ly.heart.domain.OrderPaymentExecutionEntity;

import javax.annotation.Resource;

/**
 * 采购订单付款执行明细Service业务层处理
 *
 * @author wutao
 * @date 2024-06-23
 */
@Service
public class OrderPaymentExecutionServiceImpl extends ServiceImpl<OrderPaymentExecutionMapper,OrderPaymentExecutionEntity> implements IOrderPaymentExecutionService {

    @Resource
    private OrderPaymentExecutionMapper orderPaymentExecutionMapper;

    /**
     * 查询采购订单付款执行明细
     *
     * @param id 采购订单付款执行明细ID
     * @return 采购订单付款执行明细
     */
    @Override
    public OrderPaymentExecutionEntity selectOrderPaymentExecutionEntityById(String id)
    {
        return orderPaymentExecutionMapper.selectOrderPaymentExecutionEntityById(id);
    }

    /**
     * 查询采购订单付款执行明细列表
     *
     * @param orderPaymentExecutionEntity 采购订单付款执行明细
     * @return 采购订单付款执行明细
     */
    @Override
    public List<OrderPaymentExecutionEntity> selectOrderPaymentExecutionEntityList(OrderPaymentExecutionEntity orderPaymentExecutionEntity)
    {
        return orderPaymentExecutionMapper.selectOrderPaymentExecutionEntityList(orderPaymentExecutionEntity);
    }

    /**
     * 新增采购订单付款执行明细
     *
     * @param orderPaymentExecutionEntity 采购订单付款执行明细
     * @return 结果
     */
    @Override
    public int insertOrderPaymentExecutionEntity(OrderPaymentExecutionEntity orderPaymentExecutionEntity)
    {
        orderPaymentExecutionEntity.setCreateTime(DateUtils.getNowDate());
        return orderPaymentExecutionMapper.insertOrderPaymentExecutionEntity(orderPaymentExecutionEntity);
    }

    /**
     * 修改采购订单付款执行明细
     *
     * @param orderPaymentExecutionEntity 采购订单付款执行明细
     * @return 结果
     */
    @Override
    public int updateOrderPaymentExecutionEntity(OrderPaymentExecutionEntity orderPaymentExecutionEntity)
    {
        return orderPaymentExecutionMapper.updateOrderPaymentExecutionEntity(orderPaymentExecutionEntity);
    }

    /**
     * 批量删除采购订单付款执行明细
     *
     * @param ids 需要删除的采购订单付款执行明细ID
     * @return 结果
     */
    @Override
    public int deleteOrderPaymentExecutionEntityByIds(String[] ids)
    {
        return orderPaymentExecutionMapper.deleteOrderPaymentExecutionEntityByIds(ids);
    }

    /**
     * 删除采购订单付款执行明细信息
     *
     * @param id 采购订单付款执行明细ID
     * @return 结果
     */
    @Override
    public int deleteOrderPaymentExecutionEntityById(String id)
    {
        return orderPaymentExecutionMapper.deleteOrderPaymentExecutionEntityById(id);
    }
}
